/**
 * 构造方法的重载
 */

public class User {
    int id;
    String name;
    String pwd;

    public User() {
        System.out.println("无参调用!!!");
    }

    public User(int id) {
        this.id = id;

        System.out.println(this.id);
    }

    public User(int id, String name) {
        this.id = id;
        this.name = name;

        System.out.println(this.id);
        System.out.println(this.name);
    }

    public User(int id, String name, String pwd) {
        this.id = id;
        this.name = name;
        this.pwd = pwd;

        System.out.println(this.id);
        System.out.println(this.name);
        System.out.println(this.pwd);
    }

    public static void main(String[] args) {
        User u1 = new User();
        User u2 = new User(001);
        User u3 = new User(002, "张三");
        User u4 = new User(003, "李四", "123456");
    }
}
